<nz-card  [style.display]="logForCommandId? 'none': 'block'">
    <base-grid
        [name]="'命令'"
        [keyField]="'id'"
        [usePage]="true"
        [showSort]="true"
        [columns]="columns"
        [schema]="schema"
        [customOperateButtons]="customOperateButtons"
        [customButtons]="tpl"
        [popupWidth]="800"
        [popupHeight]="'80%'"
    >
    </base-grid>


    <ng-template #tpl>
        <button nz-button nzType="primary" (click)="sendCommand2()"><i nz-icon nzType="dr:send" theme="outline"></i>发送命令</button>
    </ng-template>

    <command-send
        *ngIf="commandSendPanelVisible && this.commandType === ''"
        [commandId]="currentCommandId"
        [command]="currentCommand"
        (closeChange)="commandSendPanelVisible = false;"
    ></command-send>

    <command-bash-send
        *ngIf="commandSendPanelVisible && this.commandType === 'bash'"
        (closeChange)="commandSendPanelVisible = false;"
    ></command-bash-send>
</nz-card>

<ng-container *ngIf="logForCommandId">
    <sys-command-run-log [commandId]="logForCommandId" [showBack]="true" (backClick)="logForCommandId = ''"></sys-command-run-log>
</ng-container>

